package com.reggie.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.reggie.pojo.Category;
import com.reggie.pojo.Dish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CategoryDao extends BaseMapper<Category> {

    @Select("select * from category where type=#{type};")
    List<Category> selectByType(@Param("type") Integer type);

    @Select("select name from category where id=#{id};")
    String selectCategoryNameById(@Param("id") Long id);
}
